
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import create_app, db


app = create_app("development")

from info import models

# 使用终端脚本工具启动和管理flask项目
manager = Manager(app)

# 初始化数据库迁移模块
Migrate(app, db)

# 给终端脚本工具新增数据迁移的相关命令
manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    # manager.run()
    app.run()